package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MstnCatalystsChartsMapper;
import com.ruoyi.system.domain.MstnCatalystsCharts;
import com.ruoyi.system.service.IMstnCatalystsChartsService;

/**
 * 催化剂图Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-10
 */
@Service
public class MstnCatalystsChartsServiceImpl implements IMstnCatalystsChartsService 
{
    @Autowired
    private MstnCatalystsChartsMapper mstnCatalystsChartsMapper;

    /**
     * 查询催化剂图
     * 
     * @param chartsId 催化剂图主键
     * @return 催化剂图
     */
    @Override
    public MstnCatalystsCharts selectMstnCatalystsChartsBychartsId(Long chartsId)
    {
        return mstnCatalystsChartsMapper.selectMstnCatalystsChartsBychartsId(chartsId);
    }

    /**
     * 查询催化剂图列表
     * 
     * @param mstnCatalystsCharts 催化剂图
     * @return 催化剂图
     */
    @Override
    public List<MstnCatalystsCharts> selectMstnCatalystsChartsList(MstnCatalystsCharts mstnCatalystsCharts)
    {
        return mstnCatalystsChartsMapper.selectMstnCatalystsChartsList(mstnCatalystsCharts);
    }

    /**
     * 新增催化剂图
     * 
     * @param mstnCatalystsCharts 催化剂图
     * @return 结果
     */
    @Override
    public int insertMstnCatalystsCharts(MstnCatalystsCharts mstnCatalystsCharts)
    {
        mstnCatalystsCharts.setCreateTime(DateUtils.getNowDate());
        return mstnCatalystsChartsMapper.insertMstnCatalystsCharts(mstnCatalystsCharts);
    }

    /**
     * 修改催化剂图
     * 
     * @param mstnCatalystsCharts 催化剂图
     * @return 结果
     */
    @Override
    public int updateMstnCatalystsCharts(MstnCatalystsCharts mstnCatalystsCharts)
    {
        return mstnCatalystsChartsMapper.updateMstnCatalystsCharts(mstnCatalystsCharts);
    }

    /**
     * 批量删除催化剂图
     * 
     * @param chartsIds 需要删除的催化剂图主键
     * @return 结果
     */
    @Override
    public int deleteMstnCatalystsChartsBychartsIds(Long[] chartsIds)
    {
        return mstnCatalystsChartsMapper.deleteMstnCatalystsChartsBychartsIds(chartsIds);
    }

    /**
     * 删除催化剂图信息
     * 
     * @param chartsId 催化剂图主键
     * @return 结果
     */
    @Override
    public int deleteMstnCatalystsChartsBychartsId(Long chartsId)
    {
        return mstnCatalystsChartsMapper.deleteMstnCatalystsChartsBychartsId(chartsId);
    }
}
